<template>
  <div class="logo" @click="redirct_index" :style="logoStyle"></div>
</template>

<script>
export default {
  props: ["redirct"],
  name: "ht-ms-logo",
  data() {
    return {
      logo_url: require("@/assets/logo.png")
    };
  },

  computed: {
    logoStyle(v) {
      return {
        "background-image": `url(${this.logo_url})`
      };
    }
  },
  methods: {
    redirct_index() {
      this.$router.push({
        path: this.redirct
      });
    }
  }
};
</script>

<style lang="scss" scoped>
.logo {
  height: 100%;
  text-align: center;
  width: 100%;
  height: 50px;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  transition: 0.5s all;
  &:hover {
    background-color: #ececec;
    cursor: pointer;
  }
}
</style>
